const path = require('path')
const fs = require('fs')

const bookSources = []

const files = fs.readdirSync(__dirname)
for (let i = 0; i < files.length; i++) {
  const filename = path.join(__dirname, files[i])
  if (filename.endsWith('BS') && filename !== __filename) {
    const bookSource = require(filename)
    // console.log(bookSource)
    bookSources.push(bookSource)
  }
}

module.exports = bookSources
